package com.party.core.model.mall;

/**
 * Created by wei.li
 *
 * @date 2017/8/16 0016
 * @time 14:52
 */
public class MallProductWithSpec extends MallProduct {

    //规格编号
    private String specId;

    //规格值
    private String value;

    public String getSpecId() {
        return specId;
    }

    public void setSpecId(String specId) {
        this.specId = specId;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        MallProductWithSpec that = (MallProductWithSpec) o;

        if (specId != null ? !specId.equals(that.specId) : that.specId != null) return false;
        return value != null ? value.equals(that.value) : that.value == null;

    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (specId != null ? specId.hashCode() : 0);
        result = 31 * result + (value != null ? value.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "MallProductWithSpec{" +
                "specId='" + specId + '\'' +
                ", value='" + value + '\'' +
                '}';
    }
}
